using System;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json;

using MarketPlace.Data.Bases;

namespace MarketPlace.Data.DomainModels
{
    [JsonObject(MemberSerialization.OptIn)]
    public partial class Product : BusinessBase<long>
    {
        #region Declarations

		private string _name = String.Empty;
		
		private Industry _industry = null;
		
		
		#endregion

        #region Constructors

        public Product() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            
            sb.Append(this.GetType().FullName);
			sb.Append(_name);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

        [JsonProperty]
		public virtual string Name
        {
            get { return _name; }
			set
			{
				OnNameChanging();
				_name = value;
				OnNameChanged();
			}
        }
		partial void OnNameChanging();
		partial void OnNameChanged();
		
		public virtual Industry Industry
        {
            get { return _industry; }
			set
			{
				OnIndustryChanging();
				_industry = value;
				OnIndustryChanged();
			}
        }
		partial void OnIndustryChanging();
		partial void OnIndustryChanged();
		
        #endregion
    }
}
